<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" th:href="@{/layui/css/layui.css}">
    <style>
        .form {
            width: 400px;
            height: 265px;
            background-color: #ffffff;
            position: absolute;
            top: 0;
            bottom: 0;
            left: 0;
            right: 0;
            margin: auto;

        }

        .form .header {
            background-color: #009688;
            color: #fff;
            text-align: center;
            padding: 10px 0;
            font-size: 20px;
            font-weight: bold;
        }

        .box {
            margin-top: 10px;
            padding: 0 5px;
            border: 1px solid #ccc;
            border-radius: 5px;
        }

        .form .body {
            padding: 0 20px 10px;

        }

        .inpt {
            height: 28px;
            border: none;
            outline: none;
        }

        .btn1 {
            background-color: #009688;
        }

        .btn2 {
            background-color: rgb(170, 170, 170);
        }

        .btn1 {
            color: #fff;
            text-align: center;
            padding: 10px 0;
            display: block;
            margin-top: 10px;
            text-decoration: none;
            line-height: 5px;
            border-radius: 5px;
            width: 100%;
            height: 30px;
        }

        .btn2 {
            color: #fff;
            text-align: center;
            padding: 10px 0;
            display: block;
            margin-top: 10px;
            text-decoration: none;
            height: 10px;
            line-height: 5px;
            border-radius: 5px;
        }
        .max{
            background-image: url(/layui/picture/background.jpg);background-repeat: no-repeat;background-size: 100% 100%;background-attachment: fixed;
        }
    </style>
</head>
<body class="max">
<form action="/user/save" method="post" class="form">
    <div class="header">添加用户信息</div>
    <div class="body">
        <div class="box"><input name="id" placeholder="id" class="inpt"/><br></div>
        <div class="box"><input name="name" placeholder="姓名" class="inpt"/><br></div>
        <div class="box"><input name="age" placeholder="年龄" class="inpt"/><br></div>
        <input type="submit"class="btn1"/>
        <a href="#" class="btn2" th:href="@{/user/listhtml}">取消</a>
    </div>
</form>
</body>
</html>